package com.todo.event.activity.application.handler.activityrule;

import com.todo.event.activity.application.entity.context.ActivityRuleContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author azhebuxing
 * @date 2025/1/13 15:23
 * @description
 */
@Slf4j
@Component
public class CrowdHandle extends AbstractActivityRuleHandle{


    @Override
    protected String ruleName() {
        return "Crowd";
    }

    @Override
    protected boolean doRuleHandle(ActivityRuleContext context) {
        //TODO 人群规则待实现，目前默认通过
        return true;
    }

    @Override
    protected boolean ruleMatch(ActivityRuleContext context) {
        if (context != null && context.isHitCrowd()){
            return true;
        }
        return false;
    }
}
